Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/scheme-utilities

Package Overview
Dependencies
Maintainers
0
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/scheme-utilities

Fluent UI React subtheme generator.

  • 8.3.65
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.5K
increased by5.12%
Maintainers
0
Weekly downloads
 
Created
Source

@fluentui/scheme-utilities

Theme variant generator for Fluent UI React (formerly Office UI Fabric React)

Variants are themes generated from an existing theme, as opposed to from raw colors. A variant will share the same colors as the original theme it was generated from, but will use those colors differently. For example, the background color and text color might be swapped. Variants can be used to highlight or de-emphasize portions of the page.

Example of normal, soft, and strong variants:

example of variants

This project provides helper functions to create variants of a given theme, which can be used with the ThemeProvider component to theme a specific portion of the page. Each function takes in an IPartialTheme and returns an ITheme.

The following example creates a strong variant of a given theme, and applies that strong variant to the components wrapped by ThemeProvider.

import { FluentTheme } from '@fluentui/theme';
import { getStrongVariant } from '@fluentui/theme-schemes';

const strongTheme = getStrongVariant(FluentTheme);

<ThemeProvider theme={strongTheme}>
  <components... />
</ThemeProvider>

The available variants are:

  • getNeutralVariant(theme: IPartialTheme): ITheme
    • Neutral - a soft neutral color is used as the background (light gray in the default theme), most other colors are changed very little or not at all
  • getSoftVariant(theme: IPartialTheme): ITheme
    • Soft - a soft shade of the primary color is used as the background (light blue in the default theme), most other colors are changed very little or not at all, but input controls look different
  • getStrongVariant(theme: IPartialTheme): ITheme
    • Strong - a strong shade of the primary color is used as the background (blue in the default theme), almost all colors are changed

FAQs

Package last updated on 23 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc